<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>首页查看</title>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/common.js"></script>
</head>

<body>
	<table width="98%" class="input tabContent">
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">类型：</td>
			<td class="tdLeft">
				<c:choose>
	  				<c:when test="${indexImage.type == 0}">轮播图片</c:when>
	  				<c:when test="${indexImage.type == 1}">产品分类</c:when>
	  				<c:when test="${indexImage.type == 2}">大家都喜欢</c:when>
	  				<c:when test="${indexImage.type == 3}">新品上架</c:when>
			  		<c:when test="${indexImage.type == 4}">热销排行</c:when>
	  				<c:otherwise>${indexImage.type}</c:otherwise>
	  			</c:choose>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">排序：</td>
			<td class="tdLeft">${indexImage.orders }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">标题：</td>
			<td class="tdLeft">${indexImage.title }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">网址：</td>
			<td class="tdLeft">${indexImage.url }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22" id="priceTr" <c:if test="${indexImage.type != 2 && indexImage.type != 3 }">style="display:none"</c:if>>
			<td class="tdRight">原价：</td>
			<td class="tdLeft">${indexImage.price }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22" id="promotionPriceTr" <c:if test="${indexImage.type != 2 && indexImage.type != 3 }">style="display:none"</c:if>>
			<td class="tdRight">促销价：</td>
			<td class="tdLeft">${indexImage.promotionPrice }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">图片：</td>
			<td class="tdLeft">
				<a href="${indexImage.url}" target="_blank"><img src="<%=basePath%>download.shtml?filepath=${indexImage.source}" width="80" height="50" title="${indexImage.title}"/></a>
			</td>
		</tr>
	</table>
	<table width="98%">
		<tr bgcolor="#EEF4EA">
			<td height="36" colspan="10">
				<input type="button" value="返回" class="button" onclick="location.href='<%=basePath%>admin/indexImage/list.shtml'" >
			</td>
		</tr>
	</table>
</body>
</html>
